package routes

import (
	"doctor_api_backend/controller"

	"github.com/gin-gonic/gin"
)

// 设置医生病人映射表路由
func SetupDoctorPatientMappingRoutes(r *gin.RouterGroup) {
	doctorPatientMappingRouter := r.Group("/doctor_patient_mapping")
	{
		// 获取所有医生病人映射表
		doctorPatientMappingRouter.GET("", controller.GetDoctorPatientMapping)

		// 获取医生病人映射表 by id
		doctorPatientMappingRouter.GET("/:id", controller.GetDoctorPatientMappingByID)

		// 创建医生病人映射表
		doctorPatientMappingRouter.POST("", controller.CreateDoctorPatientMapping)

		// 更新医生病人映射表
		doctorPatientMappingRouter.PUT("/:id", controller.UpdateDoctorPatientMapping)

		// 删除医生病人映射表
		doctorPatientMappingRouter.DELETE("/:id", controller.DeleteDoctorPatientMapping)

		// 获取医生病人映射表 by doctor id
		doctorPatientMappingRouter.GET("/doctor/:id", controller.GetDoctorPatientMappingByDoctorID)

		// 获取医生病人映射表 by patient id
		doctorPatientMappingRouter.GET("/patient/:id", controller.GetDoctorPatientMappingByPatientID)
	}
}
